package com.seari.controller;

import com.seari.pojo.MessageBean;
import com.seari.service.TopService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by 98383 on 2019/5/8.
 */
@RestController
@RequestMapping("/top")
public class TopController {
    @Resource
    TopService topService;

    /**
     * 交换机流量监测
     * @return
     */
    @RequestMapping("/flowList")
    public MessageBean list(){
        return topService.selectAllFlow();
    }

    /**
     * top3
     */
    @RequestMapping("/cpu")
    public MessageBean cpu(){
        return topService.selectCpuTop();
    }

    /**
     * cuptop
     */
    @RequestMapping("/MGTcpu")
    public MessageBean MGTcpu(){
        return topService.selectCup();
    }
}